home *** CD-ROM | disk | FTP | other *** search
/ PC-SIG: World of Games / PC-SIG World of Games (CDRM1080710) (1993).iso / 922 / TUTOR.JEM < prev    next >
Text File  |  1988-09-05  |  24KB  |  551 lines

  1.                                 JEM Tutor
  2.         
  3.                   First make a backup of the JEM disk.
  4.          If you are unsure how to make a copy read the section in your
  5.        DOS manual under the copy command.JEM must have a CGA or a EGA to
  6.        work a color monitor is not necessary a mono (one color) monitor
  7.        is ok with a CGA EGA.
  8.                  --------------------------------------
  9.         To use this tutorial print this file out to the printer or go
  10.        back to DOS and type in "copy tutor.prn prn" hit enter.You will
  11.        need a copy of this in front of you to use this tutorial.
  12.         This tutorial assumes that you know some DOS commands , if you do
  13.        not you will need your DOS manual. This tutorial will teach you
  14.        how to use JEM step by step.So start on the first page and go
  15.        through it slowly if you have a problem go back a page.After you
  16.        get the hang of the commands JEM is very is easy to program in.
  17.         
  18.         First JEM is a LOGO like computer language or a Graphics
  19.        language. You can write computer programs in the JEM language that
  20.        will create geometric shapes by ordering the Turtle around the
  21.        screen. The following tutorial will teach the basic commands of
  22.        JEM. The commands must be enter exactly as in this tutorial if the
  23.        screen does not look like the tutorial says it should reenter the
  24.        commands.
  25.         IMPORTANT TYPE IN THE COMMANDS EXACTLY IF A LETTER IS IN
  26.         CAPITALS OR IF IT IS SMALLCAPS LOOK CLOSE AT THE COMMAND.
  27.        ---------------------------------------------------   
  28.         Put the JEM disk in Drive A , type "jem" the screen should blank
  29.        and a small pyramid shape should appear in the center of the
  30.        screen. The small pyramid shape is called the Turtle. The display
  31.        should also be switched To the 40 character per line mode. The
  32.        bottom line of the screen will look like the line below.
  33.         
  34.                  ?-                                     !
  35.         
  36.         This is the command line all JEM commands are entered here.
  37.         Type in help the screen will now be in 80 character per line
  38.        mode. The screen will have two columns the column on the left is
  39.        the list of the commands "built into JEM" . The column to the
  40.        right is a brief description of the command on the left,the last
  41.        line reads "Press any Key for more Help". 
  42.         Press the space bar five (5)times. You have the Turtle in the
  43.        center of the screen and the bottom line should look like the line
  44.        below if the not press the space bar until the line appears.
  45.         
  46.                ?-                                       !
  47.         
  48.                  This line is called the command line.
  49.  
  50.         
  51.  Moving the Turtle forward and back.
  52.          
  53.         To start to order the turtle around the screen type in forw [10]
  54.        then hit enter the turtle will move ahead ten (10) spaces. And
  55.        will leave a line behind it. Type in back [20] then hit enter the
  56.        turtle will back up twenty (20) spaces. Try moving the turtle
  57.        forward 15 spaces type in forw [15] hit enter 
  58.         The turtle should move ahead fifteen spaces. Try moving the turtle
  59.        back 12 spaces type in back [12] then hit enter.
  60.         Try moving the turtle yourself when you feel confident in moving
  61.        the turtle go on to next section.
  62.         
  63.  Clearing the Screen 
  64.         
  65.         To clear the screen type in cs hit enter. The screen should be
  66.        clear now.
  67.  
  68.  Turning the Turtle
  69.         
  70.          To turn the turtle type in turn [180] hit enter the turtle should
  71.        be facing the command line. Type in turn [360]  hit enter the
  72.        turtle should be facing the top of the screen. The turtle may
  73.        turned in any direction between 0 and 360 using this command.
  74.         
  75.                                   0
  76.         
  77.                            270    T     90
  78.         
  79.                                  180
  80.         Think of the top of the screen being 0 degrees and the bottom of
  81.        the screen being 180 degrees. Or think of a compass ,the
  82.        turn [angle] command will turn the turtle around like the pointer
  83.        of a compass.
  84.         
  85.  Hiding and Showing the Turtle
  86.         
  87.         The Turtle may be hidden (made to disappear) type in hide hit
  88.        enter. The turtle should be gone type in show hit enter the turtle
  89.        should be back. Try this commands a few times.
  90.         
  91.  Drawing Lines and Centering the Turtle
  92.         
  93.         You can turn the line drawing by turtle on or off. Type in the
  94.        command upen hit enter. Now type in the command back [25] hit
  95.        enter. The turtle will have backed up 25 spaces and there will be
  96.        no line drawn. Type in dpen hit enter , type in forw [25] hit
  97.        enter. The turtle will have moved forward 25 spaces and drawn a
  98.        line. Type in upen forw [30]  hit enter the turtle should be 30
  99.        spaces forward and there should be no line drawn.
  100.         To put the turtle back in the center of the screen type gh hit
  101.        enter. The turtle should be in the center of the screen.
  102.             
  103.  Switching Line Colors
  104.         
  105.          You can switch the color of the lines first clear the screen by
  106.         using the clear screen command. Type in cs hit enter.
  107.          Type in forw [5] Clr [3] forw [5]  hit enter. You should have
  108.        one line in two different colors. Type in Clr [2] forw [5] hit
  109.        enter. The number of pen colors are 4 per palette (between 0 and
  110.        3). Try using the Clr command. 
  111.         
  112.  Switching Palettes        
  113.         
  114.         To switch palettes type in 1 hit enter you now have the first
  115.        palette of colors. Type in 2 hit enter you now have the second
  116.        palette of colors.
  117.     
  118.         
  119.  Turning Command line on or off
  120.         
  121.         You can turn the command line on or off to turn the line off type
  122.        in Off hit enter. To turn the command line on type in Line hit
  123.        enter.
  124.  
  125.  Switching to 80 or 40 Characters per line mode
  126.         
  127.         You can switch from 40 characters per line mode to the 80
  128.        character per line mode. Type in Hi hit enter you are now in the
  129.        80 character per line mode. Type in med hit enter you are now in
  130.        the 40 character per line mode.
  131.         
  132.       
  133.  Exiting JEM
  134.         Type in end hit enter the screen will clear and the dos prompt
  135.        will appear.
  136.         To go on with this Tutorial -
  137.         At the DOS prompt Type in jem hit enter
  138.         You will now be back in the the JEM program.
  139.         If the user has created a command JEM will ask if you wish to
  140.        save the file before returning to DOS.
  141.         (Note see loading and saving files).
  142.         The next commands are more complex make sure you understand
  143.        everything up to this point.
  144.       
  145.  Drawing a Box
  146.         Using the commands shown so far you may now order the Turtle to
  147.        do some complex commands. Like drawing a box first clear the
  148.        screen use the cs command.
  149.        Type in cs hit enter.
  150.        Type in forw [20] turn [90] forw [20]  hit enter.
  151.        Type in turn [180] forw [20] hit enter.
  152.        Type in turn [270] forw [20] hit enter.
  153.        Now to hide the Turtle 
  154.        Type in hide hit enter.
  155.        You will now have a box drawn on the screen.
  156.        Now clear the screen and show the Turtle
  157.        Type in cs show hit enter
  158.         
  159.  Right and Left Turns
  160.         You can turn the turtle right of its current position by using
  161.        the right turn command.
  162.          Type in rtrn [10]  hit enter
  163.         (The turtle should be ten degrees right of where it started) 
  164.         Type in ltrn [10] hit enter 
  165.         (The turtle should be 1ten degrees left of where it started)
  166.         The rtrn [angle] and the ltrn [angle] will turn the turtle from
  167.        the current position. 
  168.         
  169.  To draw a box using the rtrn command 
  170.         First Clear the screen
  171.         Type in cs hit enter
  172.         Type in forw [20] rtrn [90] hit enter.
  173.         Type in forw [20] rtrn [90] hit enter.
  174.         Type in forw [20] rtrn [90] hit enter.  
  175.         Type in forw [20] rtrn [90] hit enter.
  176.         Type in hide hit enter.
  177.         
  178.  Using the again Command
  179.         You can use the again command to make the computer do the hard
  180.         work. To use the again command first clear the screen using the
  181.         cs command and show the turtle.
  182.         Type in cs show  hit enter.
  183.         Type in agn [4] forw [20] rtrn [90] hit enter
  184.         You now have a box on the screen.
  185.       
  186.  Using the Faster command
  187.         
  188.         If speed of the drawing seems slow there is a way to speed the
  189.         Turtle up using the F command. First clear the screen.
  190.         Type in cs  hit enter
  191.         Type in F agn [4] forw [20] rtrn [90] hit enter.     
  192.         This is the fast mode for the Turtle.
  193.       
  194.  Using the Pause Command
  195.         
  196.         If you wish to have the Turtle stop and wait you may use the the
  197.        pse command. The pse (pause) command will stop the turtle and wait
  198.        for a key to be pressed before going on the next command. To use
  199.        the pse command first clear the screen -
  200.        Type in cs hit enter
  201.        Type in forw [30] pse rtrn [90] forw [20]  hit enter
  202.         The turtle will go forward 30 spaces and wait now hit any key on
  203.        the key board. The turtle will now turn and go forward 20 spaces
  204.        and stop.
  205.         
  206.  Switching the Background color
  207.         
  208.         To switch the background color use the B command.
  209.         Type in  B [3] hit enter
  210.         Type in  B [0] hit enter
  211.         There are 0 to 15 background colors that you can use with a CGA.
  212.         To reset to the default settings 
  213.         Type in cs hit enter
  214.       
  215.  The Repeat Command
  216.         
  217.         The Repeat command will repeat all the commands following it. The
  218.        repeat command has to control keys they are the p key and the s
  219.        key. When the repeat command is running hitting the p key will
  220.        pause the turtle hitting any key but the s key will continue the
  221.        Repeat command. If you hit the s key the turtle will stop. to use
  222.        the repeat command-
  223.         Type in Rept rtrn [93] forw [11] hit enter
  224.         To pause the repeat command hit the the  p key.
  225.         (Note do not hit the enter key)
  226.         To continue the repeat hit the spacebar.
  227.         (Note do not hit the enter key)
  228.         To stop the repeat -
  229.         Hit the p  key then hit the s key.
  230.         (Note do not hit the enter key).
  231.         Type in  cs hit enter
  232.         
  233.  To Enter Text on the screen
  234.         
  235.         To enter text on the screen use the T command. To use the text
  236.        command-
  237.         Type in T [2] Hello There ,  hit enter
  238.         The number in the brackets is the line number to write the text.
  239.        The message you wish displayed on the screen must end with a
  240.        comma.
  241.  
  242.         
  243.  
  244.         
  245.         
  246.                         
  247.  Creating your own programs or commands
  248.         
  249.         JEM allows you to create your own commands using the commands you
  250.        have be shown. To create your own commands 
  251.         Type in expl hit enter
  252.         Type in tell hit enter
  253.         Type in Rightbox= F agn [4] forw [30] rtrn [90] ; hit enter
  254.         The screen will now be back with the turtle and the command line.
  255.         Type in Rightbox hit enter.
  256.         The turtle will have drawn the box.
  257.         
  258.  Listing your own commands
  259.         
  260.          Jem allows you to list your commands that you have created by
  261.        using the the show command. To list your commands -
  262.         Type in expl hit enter
  263.         Type in show hit enter
  264.         Type in all hit enter
  265.         Jem will now list all the commands or words in memory.
  266.         
  267.  Forgetting a command you have created
  268.         
  269.         Jem allows you to forget or get rid of commands that you do not
  270.        want or simple do not work as planned. To use the forget command-
  271.         Type in expl hit enter
  272.         Type in forget hit enter
  273.         Type in Rightbox hit enter
  274.         Hit enter
  275.         Hit enter
  276.         The command Rightbox is now gone.
  277.  
  278.         
  279.                 
  280.  Loading Files
  281.         
  282.         To load a file use the G command to use the the get file command-
  283.         Type in G  hit enter
  284.         You will now be asked for the file name -
  285.         Type in jem.dat hit enter
  286.         (Note if JEM.DAT has been removed from your disk you will get a
  287.          error comment)
  288.         Type in expl hit enter
  289.         Type in show hit enter
  290.         Type in all hit enter
  291.         Hit the enter key until you get the command line back.  
  292.         When the Turtle and the command line return -
  293.         Type in window hit enter
  294.         You now have a window on the screen.
  295.         List the commands again and try some of the words listed in
  296.        jem.dat
  297.         
  298.  Saving Files 
  299.         
  300.         If you use the expl command during a session when you enter the
  301.        end command Jem will ask you if you wish to save the word file if
  302.        you answer yes you will be asked for the name you wish to give the
  303.        file. Or you may use the the Save command to use the the save
  304.        command.
  305.         Type in S hit enter
  306.         You then be asked to give a file name
  307.         Type in Myfile.dat hit enter
  308.  
  309.  Chaining Files
  310.         
  311.         JEM allows you chain files and commands to use this command you
  312.        must know the file name and the first command you wish to execute
  313.        in that file. 
  314.         Type in Do "jem.dat window"  hit enter
  315.         Jem will load the file jem.dat and execute the command window.
  316.         The Do command can be used to load files also to use as file
  317.        loader only see page 9.
  318.           
  319.  Auto Run JEM
  320.         
  321.         Jem allows you to create an auto run file or an auto load file to
  322.        use the auto feature. You must use the file name jem.run rename or
  323.        create a file with this name. To use the the auto run feature the
  324.        word or command startup must be in the jem.run file. The command
  325.        startup can be defined as what ever you wish.(See page 9)
  326.         
  327.         
  328.  
  329.         
  330.         
  331.                 
  332.  Variables 
  333.         
  334.         Jem allows two variables they are var1 and var2. To set the value
  335.        in the variables -
  336.         Type in s [var1=1] hit enter
  337.         Type in s [var2=5] hit enter
  338.         
  339.         To add to the current value of the variables 
  340.         
  341.         Type in s [var1+2] hit enter
  342.         (this will add 2 to the current value of var1)
  343.         Type in s [var2+3] hit enter
  344.         (this will add 3 to the current value of var2)
  345.  
  346.         To subtract to the current value of the variables
  347.         
  348.         Type in s [var1-2] hit enter
  349.         (this will subtract 2 from the current value of var1)
  350.         Type in s [var2-3] hit enter
  351.         (this will subtract 3 from the current value of var2)
  352.         
  353.         To use a variable -
  354.         
  355.         Type in forw [var1] turn [var2] hit enter
  356.  
  357.  Screen wrap ON or OFF
  358.         
  359.         The screen normally wraps around that is to say that the turtle
  360.        if it goes off the top of the screen it will appear at the bottom
  361.        of the screen. You can turn the the wrap off if you wish that
  362.        means the turtle will not appear at the bottom of the screen if
  363.        the turtle runs off the top of the screen. The command to turn the
  364.        wrap off is nwrp to turn the wrap on the command is wrap. 
  365.         
  366.         
  367.         To print out JEM's display turn the command line off,turn your
  368.        printer on, hit the print screen key.
  369.         
  370.         JEM is language similar to the computer language FORTH , user
  371.        words or commands may definded using the pre-defined commands
  372.        and/or user defined commands to create more commands. Load the
  373.        file JEM.DAT to see examples of user created commands.
  374.         
  375.         Chaining of files the user can chain any number of files to each
  376.        other. The Auto run feature must have the JEM.RUN in the same
  377.        directory as JEM.COM and the word startup must be used in the file
  378.        JEM.RUN to start the auto run feature. To see how the auto feature
  379.        works rename the file JEM2.DAT as JEM.RUN the load JEM. There is a
  380.        small demonstration command in that file.
  381.        
  382.          User defined commands can be repeated in the same data file but
  383.        JEM will use the first definition only. The same word can be
  384.        defined in a different file as a different command. User defined
  385.        commands must be longer than five (5) characters in length for JEM
  386.        to use them.
  387.         
  388.          When using the ag (again) command care must used not to nest the
  389.        the again command. Example of a nested command is ag [5] forw [10]
  390.        ag [4] forw [10] rtrn [3]. 
  391.         
  392.         To use the Do command to load files only simply do not give the
  393.        command a word to execute. Example of a file load using the the
  394.        Do commmand.
  395.         
  396.         Type in Do jem.dat hit enter
  397.        Jem will load the file and return to the command line. 
  398.         Also a user defined command can call itself if you do this JEM
  399.        will go in to endless loop. You can try Ctrl c to stop JEM but you
  400.        may need to shut the system off to end the loop. 
  401.         
  402.         Look at the JEM.DOC for addition information see next page for
  403.        command abbreviations.
  404.         
  405.         
  406.         Jem basic commands can be shorten to one character to save time
  407.        and space when the user creates their own commands here is a list
  408.        of the shorten commands.
  409.  
  410.         Function                      Command             Short Command
  411.         
  412.           
  413.         Moving the turtle forward       forw [spaces]       f [spaces]
  414.         Moving the turtle backwards     back [spaces]       b [spaces]
  415.         Clear screen                    cs                    c
  416.         Turn to a compass point            turn [angle]        t [angle]
  417.         Hide the turtle from view       hide                h
  418.         Show the turtle                 show                s
  419.         Turtle pen up                   upen                u
  420.         Turtle pen down                 dpen                d
  421.         Switch line colors              Clr [number]        C [number]
  422.         Switch to Palette 1             1                   1
  423.         Switch to Palette 2             2                   2
  424.         Command line on                 Line                L
  425.         Command line off                Off                 O
  426.         40 Chars per line(default)      med                 m
  427.         80 Chars per line               Hi                  H
  428.         Exiting JEM                     end                 end
  429.         Right turns                     rtrn [angle]        r [angle]
  430.         Left turns                      ltrn [angle]        l [angle]                  
  431.         Again x times                   agn [times]         a [times]
  432.         Faster command                  Fast                F
  433.         Pause wait foe keypress         pse                 p
  434.         Seting Background Color         Back [number]       B [number]
  435.         Repeat Command                  Rept                R
  436.         Put text on screen              T [line] here ,     T [line] here,
  437.         Get a data file                 G                   G
  438.         Get a data file                 Do filename         D filename
  439.         Save a data file                Save                S
  440.         Get file Do a command           Do file command     D file command
  441.         Screen wrap on                  wrap                w
  442.         Screen wrap off                 nwrp                n
  443.         
  444.         Variable # 1                    var1                var1
  445.         Variable # 2                    var2                var2
  446.         Explain to Turtle               explain             exp
  447.         
  448.         
  449.             
  450.         
  451.         The following page will let you try some user defined commands in
  452.        the data file JEM.DAT to see how the commands work.
  453.          
  454.         You can get a print out of the file JEM.DAT to look at by going to
  455.        DOS put the JEM disk in the disk drive. At the DOS prompt-
  456.         
  457.                  Type in  copy jem.dat prn hit enter
  458.  
  459.              After the printer is done load the JEM program at the DOS
  460.             prompt -
  461.                  
  462.                   Type in  jem  hit enter    
  463.                                            
  464.         This page has a number of commands in the JEM.DAT file the user
  465.         can try and look at. First load the data file jem.dat-
  466.  
  467.                 Type in   D jem.dat       hit enter
  468.                 Type in   R shapes        hit enter
  469.         
  470.         Jem will draw a number of shapes on the screen  
  471.         
  472.                 Type in   cs R shapes2    hit enter
  473.             
  474.         Jem will draw some more shapes on the screen
  475.            
  476.           To see the difference in drawing speed using the Repeat command
  477.         try this
  478.                  Type in   cs shapes2      hit enter
  479.  
  480.          When the turtle is finshed try the same word using the Faster
  481.        command.
  482.                  Type in   cs F shapes2     hit enter
  483.  
  484.          There is a noticeable difference in drawing speed.
  485.          You can use the turtle to draw letters also try 
  486.         
  487.                   Type in  cs F startwrite   hit enter
  488.         Now you can try some of the other words in the JEM.DAT file. Try
  489.        creating some words try
  490.         
  491.                   Type in   expl     hit enter
  492.                   Type in   tell     hit enter
  493.                   Type in   myword1= cs F startwrite ;  hit enter
  494.         
  495.       Get back to the command line and the turtle on the screen then -
  496.  
  497.                   Type in   myword1  hit enter
  498.         
  499.        Try creating your own words on your own now.
  500.         
  501.         
  502.         Index
  503.         
  504.         Page 1                    Command line, help command
  505.         Page 2                    Moving the Turtle  forw , back commands
  506.         Page 2                    Clearing the screen cs command
  507.         Page 2                    Turning the Turtle turn command
  508.         Page 3                    Turtle on or off hide,show command
  509.         Page 3                    Drawing lines penup pendown command
  510.         Page 3                    Centering the Turtle gohome command
  511.         Page 3                    Switching line colors Color command
  512.         Page 3                    Color Palettes   1 , 2 commands
  513.         Page 3                    Command line off Off  Line command
  514.         Page 3                    80 ,40 Chars pre line Hi ,Med command
  515.         Page 4                    Ending a Jem session end command
  516.         Page 4                    Drawing a simple Box
  517.         Page 4                    Right turn command rtrn command
  518.         Page 4                    Left turn command  ltrn command
  519.         Page 4                    Using the rtrn command
  520.         Page 4                    Using the again command agn command
  521.         Page 5                    Using the Faster command F command
  522.         Page 5                    Using the Repeat command R command
  523.         Page 5                    Switching the Background color B command
  524.         Page 5                    Using the Pause command P command
  525.         Page 5                    Using the Text command T command
  526.         Page 6                    Creating Commands 
  527.         Page 6                    Using the explain command expl command
  528.         Page 6                    Using the list command show command
  529.         Page 6                    Forgetting a command forget command
  530.         Page 7                    File handing
  531.         Page 7                    Loading a data file Get command
  532.         Page 7                    Auto command excute Do command
  533.         Page 9                    Loading a data file Do command
  534.         Page 7                    Saving a data file Save command
  535.         Page 7                    Automatic load and run of JEM
  536.         Page 8                    Variables
  537.         Page 8                    Setting the variable value
  538.         Page 8                    Addition with the variables
  539.         Page 8                    Subtraction of the variables
  540.         Page 8                    Screen wrap on or off 
  541.         Page 8                    Using nwrp command 
  542.         Page 8                    Using wrap command
  543.         Page 9                    Chaining data files
  544.         Page 10                   Basic Command Short hand
  545.         Page 11                   Using the tell command
  546.         Page 11                   Creating commands
  547.         Page 11                   Practice using commands
  548.         
  549.         
  550.         
  551.